<template>
	<view class="content">
		<view class="card">
			<cell title='申请人手机号' mode="input" v-model="formData.number" maxlength="11" required></cell>
			<cell title='法定代表人与实际控制人是否一致' mode="radios" v-model="formData.check" :radios="[{label: '是', value: '1'}, {label: '否', value: '2'}]" required></cell>
			<cell title='实际控制人姓名' v-model="formData.sjname" required></cell>
			<cell title='实际控制人身份证号' v-model="formData.sjcard" required></cell>
			<cell title='紧急联系人姓名' v-model="formData.jjname" required></cell>
			<cell title='紧急联系人身份证号' v-model="formData.jjcard" required></cell>
			<cell title='企业经营地址' mode="region" v-model="formData.region" required></cell>
			<cell title='申请人联系手机' mode="input" v-model="formData.number2" maxlength="11" required></cell>
		</view>
		<button class="btn" size="default" type="primary" @click="jump()" hover-class="is-hover">下一步</button>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				formData: {
					number:'136**** ****',
					check:'1',
					sjname:'张三',
					sjcard:'511018****',
					jjname:'李四',
					jjcard:'510109****',
					region:'',
					number2:'158 **** ****',
					}
			}
		},
		
		methods: {
			toast(title) {
				uni.showToast({
					icon: "none",
					title,
				})
			},
			async jump() {
				if(!this.formData.number) {
					this.toast('请输入申请人手机号')
					return
				}
				
				if(!this.formData.sjname) {
					this.toast('请输入实际控制人姓名')
					return
				}
				if(!this.formData.sjcard) {
					this.toast('请输入实际控制人身份证号')
					return
				}
				if(!this.formData.jjname) {
					this.toast('请输入紧急联系人姓名')
					return
				}
				if(!this.formData.jjcard) {
					this.toast('请输入紧急联系人身份证号')
					return
				}
				if(!this.formData.region) {
					this.toast('请选择企业经营地址')
					return
				}
				if(!this.formData.number2) {
					this.toast('请输入申请人联系手机')
					return
				}
				await this.$myloading() // async
				uni.setStorageSync('isInsertInfo', true);
				uni.navigateBack({delta:this.go*1})
				//redirectTo 
			}
		}
	}
</script>

<style lang="scss" scoped>
	.btn {
		margin-top: 60rpx;
		width: calc(100% - 60rpx);
	}
</style>